projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4dca87
)
babl: protect some functions used by TRC code from NaNs
author
Øyvind Kolås
<pippin@gimp.org>
Fri, 8 Sep 2017 16:35:59 +0000
(18:35 +0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Fri, 8 Sep 2017 16:36:36 +0000
(18:36 +0200)
babl/babl-trc.c
patch
|
blob
|
history
diff --git
a/babl/babl-trc.c
b/babl/babl-trc.c
index 46bb98ea6ca27eaa78a9748bc9f468cfe33d7e98..b7a97172fb01af0d74132749c258673d17106bb7 100644
(file)
--- a/
babl/babl-trc.c
+++ b/
babl/babl-trc.c
@@
-366,7
+366,11
@@
static inline float obabl_powf(float x, float y)
static inline float babl_powf (float x, float y)
{
- return expf (y * logf (x));
+ float ret;
+ ret = expf (y * logf (x));
+ if (ret < 0.0 || ret < 0.0f)
+ return ret;
+ return 0.0f;
}